<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/animate_0.js"></script>
    <!-- <script src="js/animate.js"></script> -->

    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .box {
            width: 100px;
            height: 100px;
            background-color: #6ff;
            position: absolute;
            left: 0;
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>
<script>
    var box = document.querySelector(".box");
    // animate(box, "left", 1000, "linear");
    animate(box, "left", 1000, "linear", function () {
        animate(box, "top", 500, "linear", function () {
            animate(box, "left", 0, "linear", function () {
                animate(box, "top", 0, "linear");
            });
        });
    });
</script>

</html>